package com.way.designpatterncodepratice.factory.simpleFactory;

/**
 * @author liangliwei 80551025
 * @description
 * @date 2020-06-22
 */
public class Main {
    public static void main(String[] args) {
        /**
         * 传统方法耦合度太高而且违反开闭原则
         * 如果增加pizza 每家店都要修改orderPizza() 方法 增加pizza种类
         */
        PizzaStore pizzaStore = new PizzaStore(new SimplePizzaFactory());
        PizzaStore1 pizzaStore1 = new PizzaStore1(new SimplePizzaFactory());
        pizzaStore.orderPizza();
        pizzaStore1.orderPizza();
    }
}
